package com.my.aslife.mapper;

import com.my.aslife.module.common.Condition;
import com.my.aslife.module.entity.RunnerDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2022-12-12
 */
@Mapper
public interface RunnerDetailMapper extends BaseMapper<RunnerDetail> {

    /**
     *  根据用户 uid 查找数据
     * @param uid uid
     * @return RunnerDetail
     */
    RunnerDetail queryRunnerDetailByUID(Integer uid);

    /**
     *  更新申请者数据
     * @param runnerDetailData runnerDetailData
     */
    void updateRunnerDetail(RunnerDetail runnerDetailData);

    void commitApply(@Param("uid") Long uid, @Param("status")Integer status);

    List<RunnerDetail> getUserIllegalByPage(int start, int size);

    void applyRunnerFail(RunnerDetail runnerDetail);

    void applyRunnerOK(RunnerDetail runnerDetail);

    void deleteRunenrDetailByUID(Long uid);
}
